Skip to content

Instantly share code, notes, and snippets.

@lornajane
lornajane / mac.md
Last active May 21, 2024 10:37
Keyboard Only OS X

Keyboard-only Mac Cheatsheet

Hi, I'm Lorna and I don't use a mouse. I have had RSI issues since a bad workstation setup at work in 2006. I've tried a number of extra hardware modifications but what works best for me is to use the keyboard and only the keyboard, so I'm in a good position and never reaching for anything else (except my coffee cup!). I rather unwisely took a job which required me to use a mac (I've been a linux user until now and also had the ability to choose my tools carefully) so here is my cheatsheet of the apps, tricks and keyboard shortcuts I'm using, mostly for my own reference. Since keyboard-only use is also great for productivity, you may also find some of these ideas useful, in which case at least something good has come of this :)

Apps List

There's more detail on a few of these apps but here is a quick overview of the tools I've installed and found helpful

Tool Link Comments
@LingDong-
LingDong- / ln.c
Last active May 21, 2024 10:37
simple, fast, accurate natural log approximation without <math.h>
// ln.c
//
// simple, fast, accurate natural log approximation
// when without <math.h>
// featuring * floating point bit level hacking,
// * x=m*2^p => ln(x)=ln(m)+ln(2)p,
// * Remez algorithm
// by Lingdong Huang, 2020. Public domain.
@plastic041
plastic041 / index.ts
Created February 20, 2023 07:19
hono + socket.io
import { serve } from "https://deno.land/std@0.162.0/http/server.ts";
import { Server } from "https://deno.land/x/socket_io@0.2.0/mod.ts";
import { Hono } from "https://deno.land/x/hono@v3.0.0/mod.ts";
import { logger, html } from "https://deno.land/x/hono@v3.0.0/middleware.ts";
const app = new Hono();
app.use("*", logger());
app.get("/", (c) => {
return c.html(
@ckwastra
ckwastra / initialization-in-cpp-a-corner-case.md
Last active May 21, 2024 10:35
Initialization in C++: A Corner Case

Initialization in C++: A Corner Case

Recently, I've been trying to find out the difference between copy-initialization (e.g. in return statements) and direct-initialization (e.g. in static_cast expressions). Besides the explicit keyword, the code posted by [Johannes] really caught my attention because recent versions of GCC and Clang exhibit different behaviors for the mentioned code. Upon further investigation, it may be surprising that these behaviors are somewhat intentional. In the following, I will try to explain this corner case of initialization in C++. This post may be a bit arcane. Anyway, have fun reading!

Introduction

Given the following code:

// -std=c++23
@kyo-takano
kyo-takano / making-the-most-of-local-llms.ipynb
Last active May 21, 2024 10:33
ローカルLLMはこーやって使うの💢
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
/play
/*.png
/*.bmp
/solitaire
@mrshoikot
mrshoikot / s3_lambda_thumbnail_generator.py
Last active May 21, 2024 10:31
S3 thumbnail generator using lambda function
import boto3
import os
import urllib
from PIL import Image
import fitz
s3 = boto3.client('s3')
def lambda_handler(event, context):
# Get the bucket and key from the event
@rylev
rylev / learn.md
Created March 5, 2019 10:50
How to Learn Rust

Learning Rust

The following is a list of resources for learning Rust as well as tips and tricks for learning the language faster.

Warning

Rust is not C or C++ so the way your accustomed to do things in those languages might not work in Rust. The best way to learn Rust is to embrace its best practices and see where that takes you.

The generally recommended path is to start by reading the books, and doing small coding exercises until the rules around borrow checking become intuitive. Once this happens, then you can expand to more real world projects. If you find yourself struggling hard with the borrow checker, seek help. It very well could be that you're trying to solve your problem in a way that goes against how Rust wants you to work.

@lavantien
lavantien / SortingAlgsBenchmarks.c
Created September 30, 2018 08:33
A Benchmarking Program for various Sorting Algorithms writen in C.
// Sorting Algorithms Benchmarks v0.0
// Created by LaVanTien
// 02/01/2016 6:00 AM
// Compiled at C language - ISO C11
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <time.h>
#define TEMPSIZE 10000

E DAJE

Ci hai creduto davvero???? Ma io che ne so'!!!

Se lo sapevo lo dicevo a te???

Se hai cliccato lascia un TUO commento nel muro della vergogna